﻿<%--
    Churned Ajax Toolkit
    http://www.codeplex.com/ChurnedAjaxToolkit

    This source is subject to the Microsoft Permissive License.
    All other rights reserved.

    Version:  1.0.1 released 25 April 2008
--%>

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="ChurnedAjaxToolkit" Namespace="ChurnedAjaxToolkit" TagPrefix="cat" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>TextEditExtender</title>
    <script type="text/javascript">
        function onEdited(sender,args) {
            var div = document.createElement('div');
            var str = args.get_editText();
            var text = document.createTextNode(str);
            div.appendChild(text);
            args.set_displayText(div.innerHTML);
            args.set_handled(true);
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <asp:ScriptManager runat="server" ID="smMain" />
            <h2>TextEditExtender</h2>
            <br />
            <asp:TextBox runat="server" ID="txtTest"
                CssClass="transparent_class"
                TextMode="SingleLine" />
            <cat:TextEditExtender runat="server" ID="teTest"
                TargetControlID="txtTest"
                
            />
            <br /><br />
            <table>
                <tr>
                    <th>Multi Line</th>
                    <td>
                        <asp:DropDownList runat="server" ID="ddl_textboxMode">
                            <asp:ListItem Text="Single Line" Value="SingleLine" />
                            <asp:ListItem Text="Multi Line" Value="MultiLine" />
                            <asp:ListItem Text="Password" Value="Password" />
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <th>Use Label Css Class</th>
                    <td>
                        <asp:CheckBox runat="server" ID="cb_labelCssClass"
                            Checked="true" />
                    </td>
                </tr>
                <tr>
                    <th>Use Label Hover Css Class</th>
                    <td>
                        <asp:CheckBox runat="server" ID="cb_labelHoverCssClass"
                            Checked="true" />
                    </td>
                </tr>
                <tr>
                    <th>Use TextboxCssClass</th>
                    <td>
                        <asp:CheckBox runat="server" ID="cb_textboxCssClass"
                            Checked="true" />
                    </td>
                </tr>
                <tr>
                    <th>Use ClientEdited Script</th>
                    <td>
                        <asp:CheckBox runat="server" ID="cb_clientEdited"
                            Checked="true" />
                    </td>
                </tr>
                <tr>
                    <th>Activation Mode</th>
                    <td>
                        <asp:DropDownList runat="server" ID="ddl_activationMode">
                            <asp:ListItem Text="Hover" Value="0" />
                            <asp:ListItem Text="Single Click" Value="1"
                                Selected="True" />
                            <asp:ListItem Text="Double Click" Value="2" />
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <th>Hover Activation Delay</th>
                    <td>
                        <asp:DropDownList runat="server" ID="ddl_hoverActivationDelay">
                            <asp:ListItem Text="Immediate" Value="0" />
                            <asp:ListItem Text="Fast" Value="200"
                                Selected="True" />
                            <asp:ListItem Text="Medium" Value="400" />
                            <asp:ListItem Text="Slow" Value="600" />
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <th>Blank Text</th>
                    <td>
                        <asp:TextBox runat="server" ID="txt_blankText"
                            Text="Oh No!  How can you edit this text?!?!" />
                    </td>
                </tr>
                <tr>
                    <th>Textbox Tooltip Text</th>
                    <td>
                        <asp:TextBox runat="server" ID="txt_textboxTooltipText"
                            Text="Enter text" />
                    </td>
                </tr>
                <tr>
                    <th>Label Tooltip Text</th>
                    <td>
                        <asp:TextBox runat="server" ID="txt_labelTooltipText"
                            Text="Click to edit" />
                    </td>
                </tr>
                <tr>
                    <th>Resize Textbox Width To Label Size</th>
                    <td>
                        <asp:CheckBox runat="server" ID="cb_resizeTextboxWidth"
                            Checked="true" />
                    </td>
                </tr>
                <tr>
                    <th>Min Textbox Width</th>
                    <td>
                        <asp:TextBox runat="server" ID="txt_minTextboxWidth"
                            Text="10" />
                    </td>
                </tr>
                <tr>
                    <th>Max Textbox Width</th>
                    <td>
                        <asp:TextBox runat="server" ID="txt_maxTextboxWidth"
                            Text="100" />
                    </td>
                </tr>
                <tr>
                    <th>Resize Textbox Height To Label Size</th>
                    <td>
                        <asp:CheckBox runat="server" ID="cb_resizeTextboxHeight"
                            Checked="true" />
                    </td>
                </tr>
                <tr>
                    <th>Min Textbox Height</th>
                    <td>
                        <asp:TextBox runat="server" ID="txt_minTextboxHeight"
                            Text="10" />
                    </td>
                </tr>
                <tr>
                    <th>Max Textbox Height</th>
                    <td>
                        <asp:TextBox runat="server" ID="txt_maxTextboxHeight"
                            Text="100" />
                    </td>
                </tr>
            </table>
            <asp:Button runat="server" ID="btn1" Text="Submit" />
        </div>
    </form>
</body>
</html>
